<template>
  <el-form-item label="操作">
    <el-button size="small" plain type="primary" @click="onInstallHeightClick">安装高度</el-button>
    <el-button size="small" plain type="primary" @click="onFallDurationClick">跌倒时长</el-button>
  </el-form-item>
</template>
<script setup lang="ts">
import DeviceAlaemFallUtils from "@/utils/device-alaem-fall-utils";

defineOptions({
  name: "UserDeviceAlaemFallBtns",
});

const props = defineProps({
  sn: {
    type: [String],
    default: "",
  },
});

/**
 * @description 修改安装高度
 */
function onInstallHeightClick() {
  DeviceAlaemFallUtils.changeInstallHeight(props.sn);
}

/**
 * @description 修改跌倒时长
 */
function onFallDurationClick() {
  DeviceAlaemFallUtils.changeFallDuration(props.sn);
}
</script>
